package com.xiaowu.datajpa.service;
import com.xiaowu.datajpa.dao.CourseRepository;
import com.xiaowu.datajpa.dao.StudentRepository;
import com.xiaowu.datajpa.entity.Course;
import com.xiaowu.datajpa.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseSercvice {
    @Autowired
    private CourseRepository courseRepository;

    public Course findById(String coursenum) {
        return courseRepository.findByCoursenum(coursenum);
    }
}
